load("@io_bazel_rules_jsonnet//jsonnet:jsonnet.bzl", "jsonnet_library", "jsonnet_to_json")

jsonnet_library(
    name = "prom_lib",
    srcs = glob(["*.libsonnet"]),
)

jsonnet_to_json(
    name = "prow_prometheusrule",
    src = "prow_prometheusrule.jsonnet",
    outs = ["prow_prometheusrule.yaml"],
    imports = [
        "../lib/",
        "../vendor/",
    ],
    visibility = ["//visibility:public"],
    deps = [
        ":prom_lib",
        "//config/prow/cluster/monitoring/mixins/lib",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [":package-srcs"],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)
